package com.tangsm.spring.boot.fluent.mybatis.entity;

import cn.org.atool.fluent.mybatis.annotation.FluentMybatis;
import cn.org.atool.fluent.mybatis.annotation.TableField;
import cn.org.atool.fluent.mybatis.annotation.TableId;
import cn.org.atool.fluent.mybatis.base.RichEntity;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * UserEntity: 数据映射实体定义
 *
 * @author Powered By Fluent Mybatis
 */
@SuppressWarnings({"rawtypes", "unchecked"})
@Data
@Accessors(
    chain = true
)
@EqualsAndHashCode(
    callSuper = false
)
@AllArgsConstructor
@NoArgsConstructor
@FluentMybatis(
    table = "sys_user",
    schema = "nft_admin",
    desc = "用户信息表"
)
public class UserEntity extends RichEntity {
  private static final long serialVersionUID = 1L;

  @TableId(
      value = "user_id",
      desc = "用户ID"
  )
  private Long userId;

  @TableField(
      value = "avatar",
      desc = "头像地址"
  )
  private String avatar;

  @TableField(
      value = "create_by",
      desc = "创建者"
  )
  private String createBy;

  @TableField(
      value = "create_time",
      desc = "创建时间"
  )
  private Date createTime;

  @TableField(
      value = "del_flag",
      desc = "删除标志（0代表存在 2代表删除）"
  )
  private String delFlag;

  @TableField(
      value = "dept_id",
      desc = "部门ID"
  )
  private Long deptId;

  @TableField(
      value = "email",
      desc = "用户邮箱"
  )
  private String email;

  @TableField(
      value = "login_date",
      desc = "最后登录时间"
  )
  private Date loginDate;

  @TableField(
      value = "login_ip",
      desc = "最后登录IP"
  )
  private String loginIp;

  @TableField(
      value = "nick_name",
      desc = "用户昵称"
  )
  private String nickName;

  @TableField(
      value = "password",
      desc = "密码"
  )
  private String password;

  @TableField(
      value = "password_expire_time",
      desc = "密码更新时间"
  )
  private Date passwordExpireTime;

  @TableField(
      value = "phonenumber",
      desc = "手机号码"
  )
  private String phonenumber;

  @TableField(
      value = "remark",
      desc = "备注"
  )
  private String remark;

  @TableField(
      value = "sex",
      desc = "用户性别（0男 1女 2未知）"
  )
  private String sex;

  @TableField(
      value = "status",
      desc = "帐号状态（0正常 1停用）"
  )
  private String status;

  @TableField(
      value = "update_by",
      desc = "更新者"
  )
  private String updateBy;

  @TableField(
      value = "update_time",
      desc = "更新时间"
  )
  private Date updateTime;

  @TableField(
      value = "user_name",
      desc = "用户账号"
  )
  private String userName;

  @TableField(
      value = "user_type",
      desc = "用户类型（00系统用户）"
  )
  private String userType;

  @Override
  public final Class entityClass() {
    return UserEntity.class;
  }
}
